function customerInfoSubmit() {
    let customerName = $('#customerName').val();
    if (customerName === null || customerName === undefined || customerName.trim() === ''){
        toastr.clear();
        toastr.error('请输入陪玩昵称！');
        return;

    }
    let customerChat = $('#customerChat').val();
    let customerAlipay = $('#customerAlipay').val();
    let blacklist = $('#blacklist').val();
    let customerKook = $('#customerKook').val();
    let customerSource = $('#customerSource').val();
    let customerNote = $('#customerNote').val();
    let customerGender = $('#customerGender option:selected').val();

    let customerInfo = {
        customerName: customerName,
        customerChatName: customerChat,
        customerAlipayName: customerAlipay,
        customerBlacklist: blacklist,
        customerKookName: customerKook,
        customerSource: customerSource,
        customerNotes: customerNote,
        customerGender: customerGender
    }
    $.ajax({
        type: "post",
        url:"/customerEnter/insertCustomerInfo",
        cache: false,
        data: customerInfo,
        dataType:'json',
        success: function (res) {
            if (res.code == 200) {
                $('#customerName').val(null);
                $('#customerChat').val(null);
                $('#customerAlipay').val(null);
                $('#blacklist').val(null);
                $('#customerKook').val(null);
                $('#customerSource').val(null);
                $('#customerNote').val(null);
                $("#customerGender").val('0');
                setMsg();
            } else {
                toastr.clear();
                toastr.error('该顾客已存在，请重新输入顾客昵称！');
            }

        },
        complete: function () {

        },
        error: function(res) {
            toastr.clear();
            toastr.error('录入失败，检查录入数据是否正确！');
        }
    });

}

function setMsg() {
    let errMsg = '顾客录入成功';
    if (errMsg != null && errMsg != '') {
        toastr.clear();
        toastr.success(errMsg);
    }
}